//
//  XJSearchTieziCell.m
//  XinJiangMall
//
//  Created by RaoBo on 2018/6/4.
//  Copyright © 2018年 Tzyang. All rights reserved.
//

#import "XJSearchTieziCell.h"
#import "XJSearchTieZiModel.h"

@interface XJSearchTieziCell()
@property (weak, nonatomic) IBOutlet UIImageView *avatorIv; //图标
@property (weak, nonatomic) IBOutlet UILabel *publish_nameLb;//姓名
@property (weak, nonatomic) IBOutlet UILabel *publish_timeLb; // 时间
@property (weak, nonatomic) IBOutlet UILabel *titleLb; // 帖子标题
@property (weak, nonatomic) IBOutlet UILabel *contentLb;//帖子内容
@property (weak, nonatomic) IBOutlet UILabel *click_countLb; // 浏览人数

@end
@implementation XJSearchTieziCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.avatorIv.layer.masksToBounds = YES;
    self.avatorIv.layer.cornerRadius = self.avatorIv.rb_width * 0.5;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(XJSearchTieZiModel *)model {
    _model = model;
    
    UIImage *placeholdeImg = [UIImage imageNamed:@"default_goods"];
    
    [self.avatorIv sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:placeholdeImg];
    
    self.publish_nameLb.text = model.publish_name;
    self.publish_timeLb.text = model.publish_time;
    self.titleLb.text = model.title;
    self.contentLb.text = model.content;
    self.click_countLb.text = [NSString stringWithFormat:@"浏览%@",model.click_count];
}



@end
